<extend name="Public/base"/>
<block name="content">
<h3>行为管理</h3>
<div class="panel panel-default">
	<div class="panel-heading"><if condition="ACTION_NAME eq 'addaction'">新增<else/>编辑</if>行为</div>
 	<div class="panel-body">
    	<form id="form" class="form-horizontal"  action="<{:U('saveAction')}>" method="post" class="form-horizontal">
    		<div class="form-group">
    			<label class="col-sm-2 control-label">行为标识</label>
    			<div class="col-sm-2">
    				<input type="text" class="form-control" name="name" value="<{$data.name}>">
    			</div>
    			<span class="help-inline">输入行为标识 英文字母</span>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label">行为名称</label>
    			<div class="col-sm-2">
    				<input type="text" class="form-control" name="title" value="<{$data.title}>">
    			</div>
    			<span class="help-inline">输入行为名称</span>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label">行为类型</label>
    			<div class="col-sm-2">
    				<select name="type" class="form-control">
    					<volist name=":get_action_type(null,true)" id="vo">
    						<option value="<{$key}>"><{$vo}></option>
    					</volist>
    				</select>
    			</div>
    			<span class="help-inline">选择行为类型</span>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label">行为描述</label>
    			<div class="col-sm-3">
    				<textarea name="remark" class="form-control" ><{$data.remark}></textarea>
    			</div>
    			<span class="help-inline">输入行为描述</span>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label">行为规则<span class="check-tips"></span></label>
    			<div class="col-sm-3">
    				<textarea name="rule" class="form-control"><{$data.rule}></textarea>
    			</div>
    			<span class="help-inline">输入行为规则，不写则只记录日志</span>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label">日志规则</label>
    			<div class="col-sm-3">
    				<textarea name="log" class="form-control"><{$data.log}></textarea>
    				<span class="help-inline">记录日志备注时按此规则来生成，支持[变量|函数]。目前变量有：user,time,model,record,data</span>
    			</div>

    		</div>
    
    		<div class="form-group">
    			<input type="hidden" name="status" value="<{$data.status|default=''}>">       		
            	<div class="col-sm-3 col-sm-offset-2">
                	<button class="btn btn-default" type="button" onclick="javascript:history.back(-1);return false;">取消</button>
                	<button class="btn btn-primary" type="submit">保存</button>
            	</div>
        	</div>
        </form>
	</div>
</div>													

</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" charset="utf-8">
	Think.setValue('type',<{$type|default=1}>);
    //导航高亮
	highlight_subnav("<{:U('User/index')}>","<{:U('User/action')}>");
</script>
</block>
